/*
 * @(#) Tag.java 2018年3月5日 下午4:52:01
 *
 * Copyright 2018 CIMIP, Inc. All rights reserved.
 * H-VISIONS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */package cn.hc.share.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * 评论表entity
 * @author waitum
 *
 */
public class Comment implements Serializable
{

	private static final long serialVersionUID = 5516068653140113564L;

	private String id;//id
	private String articleId;//文章id
	private String userId;//评论人id
	private Timestamp createTime ;//评论创建时间
	private String content  ;//评论内容
	private List<Answer> answers;//评论下的所有回复
	
	public List<Answer> getAnswers()
	{
		return answers;
	}
	public void setAnswers(List<Answer> answers)
	{
		this.answers = answers;
	}
	
	public String getId()
	{
		return id;
	}
	public void setId(String id)
	{
		this.id = id;
	}
	public String getArticleId()
	{
		return articleId;
	}
	public void setArticleId(String articleId)
	{
		this.articleId = articleId;
	}
	public String getUserId()
	{
		return userId;
	}
	public void setUserId(String userId)
	{
		this.userId = userId;
	}
	public Timestamp getCreateTime()
	{
		return createTime;
	}
	public void setCreateTime(Timestamp createTime)
	{
		this.createTime = createTime;
	}
	
	public String getContent()
	{
		return content;
	}
	public void setContent(String content)
	{
		this.content = content;
	}
	
	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Comment other = (Comment) obj;
		if (id == null)
		{
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	@Override
	public String toString()
	{
		return "Comment [id=" + id + ", articleId=" + articleId + ", userId=" + userId + ", createTime=" + createTime
				+ ", content=" + content + ", answers=" + answers + "]";
	}

}
